
//支持Enter键登录
document.onkeydown = function(e){
    if($(".bac").length==0)
    {
        if(!e) e = window.event;
        if((e.keyCode || e.which) == 13){
            var obtnLogin=document.getElementById("submit_btn")
            obtnLogin.focus();
        }
    }
}

function loginUser() {
	$.post("/user/login","userName="+$("#code").val()+"&pwd="+$("#password").val(),function (info) {
		if(info != 'no'){
			location.href="/html/index/mainHtml.html";
		}else {
            show_loading();
            show_err_msg('用户名或密码错误');
		}
    })
}